package com.zhijie.base.entity;


import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public abstract class BaseEntity implements Serializable {

    @TableId
    private Long id;

    /**
     * 添加人员
     */
    private Long createUser;


    /**
     * 添加时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    /**
     * 是否有效
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Boolean delFlag;

    /**
     * 是否有效
     */
    @Version
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer version;

}
